Randomized Testing in PLT Redex
نویسندگان
چکیده
This paper presents new support for randomized testing in PLT Redex, a domain-specific language for formalizing operational semantics. In keeping with the overall spirit of Redex, the testing support is as lightweight as possible—Redex programmers simply write down predicates that correspond to facts about their calculus and the tool randomly generates program expressions in an attempt to falsify the predicates. Redex’s automatic test case generation begins with simple expressions, but as time passes, it broadens its search to include increasingly complex expressions. To improve test coverage, test generation exploits the structure of the model’s metafunction and reduction relation definitions. The paper also reports on a case-study applying Redex’s testing support to the latest revision of the Scheme standard. Despite a community review period, as well as a comprehensive, manuallyconstructed test suite, Redex’s random test case generation was able to identify several bugs in the semantics.
منابع مشابه
Experience with Randomized Testing in Programming Language Metatheory
We explore the use of QuickCheck-style randomized testing in programming languages metatheory, a methodology proposed to reduce development time by revealing shallow errors early, before a formal proof attempt. This exploration begins with the development of a randomized testing framework for PLT Redex, a domain-specific language for specifying and debugging operational semantics. In keeping wi...
متن کاملRun your Research, Mind the Binders
αCheck is a light-weight property-based testing tool built on top of αProlog. Being based on nominal logic programming, it is particularly suited to the validation of the meta-theory of formal systems. To substantiate this claim we compare its performances w.r.t. its main competitors in the logical framework niche, namely the QuickCheck/Nitpick combination offered by Isabelle/HOL and the random...
متن کاملOperational Aspects of C/C++ Concurrency
Relaxed memory models define the behavior of concurrent programs, executed on modern multiprocessors. Existing semantics for modelling relaxed concurrency in C/C++ adopt the axiomatic style, defining program executions via orders between read/write events. This representation of executions poses challenges for employing such semantics for testing, debugging and symbolic execution of programs. W...
متن کاملProperty-Based Testing via Proof Reconstruction: Work-in-progress
Property-based testing is a technique for validating code against an executable specification by automatically generating test-data. From its original use in programming languages, this technique has now spread to most major proof assistants to complement theorem proving with a preliminary phase of conjecture testing. We present a proof theoretical reconstruction of this style of testing for re...
متن کاملAdvances in Property-Based Testing for $α$Prolog
αCheck is a light-weight property-based testing tool built on top of αProlog, a logic programming language based on nominal logic. αProlog is particularly suited to the validation of the meta-theory of formal systems, for example correctness of compiler translations involving name-binding, alpha-equivalence and capture-avoiding substitution. In this paper we describe an alternative to the negat...
متن کامل